<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8" />
	<title>推广数据报表</title>
	<meta name="keywords" content="<{$title}>" />
	<meta name="description" content="<{$title}>" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<include file="Common/headerStyle" />
</head>
<body>
	<div class="main-container" id="main-container">
		<div class="main-container-inner">
			<div class="page-content">
				<div class="page-header">
					<h1>
						<{$title}>
						<small>
							<i class="icon-double-angle-right"></i>
						</small>
					</h1>
					</div><!-- /.page-header -->	
  
			<div class="alert alert-block alert-success">
				<div style="padding-bottom:24px;">
				<form action="" method="get" name="reportFrom1">
					<div class="col-xs-12 col-sm-3">
						<label for="form-field-select-1">群号</label>	
						<input type="text" name="qun" value="<{$Think.get.qun|default=''}>" />
					</div>
					<div class="col-xs-12 col-sm-3">
						<label for="form-field-select-1">状态</label>
	
						<select class="form-control" id="form-field-select-1" name="payStatus">
							<option value="">全部</option>
							<option value="0" <if condition="$Think.get.payStatus eq '0'">selected = true </if> >交易完成，未提现</option>
							<option value="1" <if condition="$Think.get.payStatus eq '1'">selected = true </if> >交易完成，提现中</option>
							<option value="2" <if condition="$Think.get.payStatus eq '2'">selected = true </if> >交易完成，已提现</option>
	
						</select>
					</div>
					
					
					<input  type="submit" class="btn btn-info btn-sm" value="查询">
				
					
				</form>
				</div>
			</div> 
  
  

		
				<div class="row">
					<div class="col-xs-12">
						<!-- PAGE CONTENT BEGINS -->

						<div class="row">


							<div class="modal-body no-padding">
								<table class="table table-striped table-bordered table-hover no-margin-bottom no-border-top">
									<thead>
										<tr>
											<th>下单时间</th>
											<th>商品信息</th>
											<th>商品ID</th>

											<th>所属店铺	</th>
											<th>商品数</th>
											<th>商品单价</th>
											<th>订单状态</th>
											<th>分成比率</th>
											<th>付款金额</th>
											<th>结算金额</th>
											<th>结算时间</th>
											<th>佣金比率</th>
											<th>佣金金额</th>
											<th>订单编号</th>
											<th>广告位名称</th>
											<th>订单类型</th>
											<th>操作</th>
											<th>高级</th>
										</tr>
									</thead>

									<tbody>
									
<volist name="list" id="list">			
										<tr>
											<td>
												<{$list.clicktime}></td>
											<td><{$list.goodstitle}></td>
											<td><{$list.goodsid}></td>
											<td><{$list.shopname}></td>
											<td><{$list.goodsnums}></td>
											
											<td><{$list.goodsprice}></td>
											<td><{$list.orderstatus}></td>
											<td><{$list.splitratio}></td>
											<td><{$list.paymentamount}></td>
											<td><{$list.settlementamount}></td>
											<td><{$list.settlementtime }></td>
											<td><{$list.commissionrate}></td>
											<td><{$list.commissionamount}></td>
											<td><{$list.ordernumber}></td>
											<td><{$list.groupname}></td>
											<td><{$list.ordertype}></td>
											<td><{$list.zhifu}>
											<if condition="$list.paybtn eq '1'">
											<button onClick="payed('<{$list.goodsid}>','<{$list.ordernumber}>','<{$Think.post.qun}>');">确定支付提现</buttion>
											<else /></if>	
											</td>
											<td>
												<button onClick="delPayInfo('<{$list.goodsid}>','<{$list.ordernumber}>','<{$Think.post.qun}>');">删除</buttion>
											</td>
										</tr>
</volist>
										
									</tbody>
								</table>
							</div>

							<div class="modal-footer no-margin-top">

								<ul class="pagination pull-right no-margin">
									<li class="prev disabled">
									<{$page}>
									</li>
								</ul>
							</div>

								<div class="row">
									<div class="col-xs-12 col-sm-3 widget-container-span">
										<div class="widget-box">
											<div class="widget-header">
												<h5 class="smaller">交易进行中</h5>

												<div class="widget-toolbar">
													<span class="label label-success">
														<{$dealing.id}>单
														<i class="icon-arrow-up"></i>
													</span>
												</div>
											</div>

											<div class="widget-body">
												<div class="widget-main padding-6">
													<div class="alert alert-info"> 可自行计算 </div>
												</div>
											</div>
										</div>
									</div>
									<div class="col-xs-12 col-sm-3 widget-container-span">
										<div class="widget-box">
											<div class="widget-header">
												<h5 class="smaller">交易完成，未提现</h5>

												<div class="widget-toolbar">
													<span class="label label-success">
														<{$unpay.id}>单
														<i class="icon-arrow-up"></i>
													</span>
												</div>
											</div>

											<div class="widget-body">
												<div class="widget-main padding-6">
													<div class="alert alert-info"> <{$unpay.commissionamount}> ￥</div>
												</div>
											</div>
										</div>
									</div>
									<div class="col-xs-12 col-sm-3 widget-container-span">
										<div class="widget-box">
											<div class="widget-header">
												<h5 class="smaller">交易完成，提现中</h5>

												<div class="widget-toolbar">
													<span class="label label-success">
														<{$paying.id}>单
														<i class="icon-arrow-up"></i>
													</span>
												</div>
											</div>

											<div class="widget-body">
												<div class="widget-main padding-6">
													<div class="alert alert-info"> <{$paying.commissionamount}> ￥</div>
												</div>
											</div>
										</div>
									</div>
									<div class="col-xs-12 col-sm-3 widget-container-span">
										<div class="widget-box">
											<div class="widget-header">
												<h5 class="smaller">交易完成，已提现</h5>

												<div class="widget-toolbar">
													<span class="label label-success">
														<{$payed.id}>单
														<i class="icon-arrow-up"></i>
													</span>
												</div>
											</div>

											<div class="widget-body">
												<div class="widget-main padding-6">
													<div class="alert alert-info"> <{$payed.commissionamount}> ￥</div>
												</div>
											</div>
										</div>
									</div>
									
									
									
									
								</div>
							
							
							
						</div><!-- /row -->

						<div class="hr hr32 hr-dotted"></div>



						<!-- PAGE CONTENT ENDS -->
					</div><!-- /.col -->
				</div><!-- /.row -->
			</div>
			

		</div><!-- /.main-container-inner -->
	</div><!-- /.main-container -->

	
	<include file = "Common/footerStyle" />
<script language="javascript" type="text/javascript">
	function payed(goodsid,ordernumber,qun)
	{
		 $.ajax(
			{
				type: 'post',
				url: '/index.php/Admins/Ajax/payEd',
				cache:false,
				dataType: 'json',
				data: {"goodsid": goodsid,"ordernumber":ordernumber,"qun":qun},
				async: false,
				beforeSend:function()
				{//触发ajax请求开始时执行
				},                
				success: function (msg, textStatus) 
				{//有数据返回时
				//alert(msg.info);
					if(msg.result==1)
					{
						alert(msg.info);
						window.location.reload();
					}
					else
					{
					   //$("#kouling"+msg.info).html("获取失败");              
					}
				},
				error:function (textStatus) 
				{//网络繁忙 错误             
				},
				complete: function(msg, textStatus)
				{ //ajax请求完成时执行                 
					if(msg.result==1)
					{
					}
				}                
			}); 
	}
	

	function delPayInfo(goodsid,ordernumber,qun)
	{
		
		var msg = "您真的确定要删除吗？\n\n请确认！";
		if (confirm(msg)==false){
			return false;
		}		
		 $.ajax(
			{
				type: 'post',
				url: '/index.php/Admins/Ajax/delPayInfo',
				cache:false,
				dataType: 'json',
				data: {"goodsid": goodsid,"ordernumber":ordernumber,"qun":qun},
				async: false,
				beforeSend:function()
				{//触发ajax请求开始时执行
				},                
				success: function (msg, textStatus) 
				{//有数据返回时
				//alert(msg.info);
					if(msg.result==1)
					{
						alert(msg.info);
						window.location.reload();
					}
					else
					{
					   //$("#kouling"+msg.info).html("获取失败");              
					}
				},
				error:function (textStatus) 
				{//网络繁忙 错误             
				},
				complete: function(msg, textStatus)
				{ //ajax请求完成时执行                 
					if(msg.result==1)
					{
					}
				}                
			}); 
	}
</script>
</body>
</html>


